| Conditions | 1 |
| Total Lines | 23 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | // Type definitions for frequency-sweep 1.0 |
||
| 2 | // Project: https://github.com/rochars/bitdepth |
||
| 3 | // Definitions by: Rafael da Silva Rocha <https://github.com/rochars> |
||
| 4 | // Definitions: https://github.com/rochars/frequency-sweep |
||
| 5 | |||
| 6 | /** |
||
| 7 | * Return the samples of a frequency sweep. The sweep may be divided |
||
| 8 | * in segments, each using a different waveform (or noise), and each with |
||
| 9 | * a start and end frequency. |
||
| 10 | * @param {!Array<Object<string, string|number>>} sequence The sequence. |
||
| 11 | * Each item in the array must have the properties: |
||
| 12 | * start: Integer value, the start frequency of the segment. |
||
| 13 | * end: Integer value, the end frequency of the segment. |
||
| 14 | * time: Float value, the duration of the segment. 1 = 1 second. |
||
| 15 | * wave: String, "sine", "square", "triangle", "sawtooth" or "noise". |
||
| 16 | * @param {number} sampleRate The sample rate. |
||
| 17 | * @param {?boolean} outputTyped True to return Float64Array, false for Array. |
||
| 18 | * @return {!Array<number>|!Float64Array} |
||
| 19 | */ |
||
| 20 | export function sweep( |
||
| 21 | sequence: Array<object>, |
||
| 22 | sampleRate: number, |
||
| 23 | outputTyped?: boolean): Array<number>|ArrayLike<any>; |
||
| 24 |